CC:=gcc
CFLAGS:= -g -o0 -wall #添加调试信息并禁用优化

log:=thirdparty/log.c thirdparty/log.h

test_log: test/test_log.c $(log)
	$(CC) -o $@ $^ -Ithirdparty
	./$@
	rm -f $@

json:=thirdparty/cJSON.c thirdparty/cJSON.h
test_json: test/test_json.c $(json) $(log)
	$(CC) -o $@ $^ -Ithirdparty
#	./test_json
#	rm -f test_json

app_common:=app/app_common.c app/app_common.h
test_common: test/test_common.c $(app_common) $(log)
	$(CC) -o $@ $^ -Iapp -Ithirdparty
	./test_common
	rm -f test_common

app_pool:=app/app_pool.c app/app_pool.h
test_pool: test/test_pool.c $(app_pool) $(log)
	$(CC) -o $@ $^ -Iapp -Ithirdparty
	./test_pool

